﻿using System;
using System.Collections.Generic;
using System.Threading.Tasks;
using VisionCloud.Core.Model.Ms;
using VisionCloud.Domain.Common;
using VisionCloud.Domain.Data;
using VisionCloud.Domain.DtoModel.Ms;
using VisionCloud.Domain.DtoModel.Rs;

namespace VisionCloud.Domain.Repository.Interface.Ms
{
    public interface IMsProjectRepository : IBaseRepository<MsProject>
    {
        /// <summary>
        /// 分页获取项目列表
        /// </summary>
        /// <param name="condition"></param>
        /// <returns></returns>
        Task<ApiPageResult> GetPage(MsProjectCondition condition);

        /// <summary>
        /// 获取项目列表
        /// </summary>
        /// <param name="condition"></param>
        /// <returns></returns>
        Task<ApiPageResult> GetList(MsProjectCondition condition);

        /// <summary>
        /// 通过项目Id获取项目详情
        /// </summary>
        /// <param name="condition"></param>
        /// <returns></returns>
        Task<ApiPageResult> GetProjectById(MsProjectCondition condition);

        Task<List<SelectItem>> GetProjectSelectItem();

        Task<List<ProjectForHome>> GetProjectForHome();

        //Task<List<MsProject>> GetListOfProjects();
        Task<List<MsProject>> GetDataByProjects(Guid[] projectIds);

        /// <summary>
        /// 作者：黄钧航
        /// 获取项目信息，图表展示使用
        /// </summary>
        /// <returns></returns>
        Task<List<ProjectInfoForHome>> GetProjectForChart(MsCondition condition, Guid companyGuid);

        void UpdateProjectVersion(Guid projectId);

        Task<string> CheckHouseMapForPublice(Guid projectId);

        Task<string> CheckHouseMapBuildingAndFloorForPublice(Guid projectId); 

        /// <summary>
        /// 作者：黄钧航
        /// 分页获取项目信息，图表展示使用
        /// </summary>
        /// <returns></returns>
        Task<List<ProjectInfoForHome>> GetProjectForChartPage(MsProjectPageCondition condition, Guid companyGuid);

        /// <summary>
        /// 作者：黄钧航
        /// FMS-获取所有已有报告数据回传的项目信息
        /// </summary>
        /// <returns></returns>
        Task<List<CSMSTaskDtoPart>> GetAllAvailableProjects();

        /// <summary>
        /// 获取项目列表(包含是否有报告)
        /// </summary>
        /// <param name="condition"></param>
        /// <returns></returns>
        Task<ApiPageResult> GetProjectWithReportList(MsProjectCondition condition);

        /// <summary>
        /// 数据分析-质量分析-分页查询项目整体合格率
        /// </summary>
        /// <param name="condition"></param>
        /// <param name="companyGuid"></param>
        /// <returns></returns>
        Task<ApiPageResult> GetProjectOverallPassRatePage(ProjectOverallPassRatePara condition, Guid companyGuid);

        /// <summary>
        /// 提供测量服务获取已发布项目
        /// </summary>
        /// <param name="condition"></param>
        /// <returns></returns>
        Task<List<MeasureServiceProjectDto>> GetPublishProjects(MsProjectCondition condition);

        /// <summary>
        /// 获取工单项目列表
        /// </summary>
        /// <param name="condition"></param>
        /// <returns></returns>
        Task<ApiPageResult> GetMapProject(WorkOrderMapRequestPageDto condition);
    }
}